<?php use_helper('I18N'); ?>
<style type="text/css">
    p img {
        background: none repeat scroll 0 0 white;
        border: 1px solid #BBBBBB;
        margin: 7px 14px 7px 0;
        padding: 5px;
        height: 50px;
        /*width: 160px;*/
    }
</style>
<script type="text/javascript">
    $(function() {
        $("#addToCart").button({
            icons: {
                primary: "ui-icon-cart"
            }
        });
        $('.onlyNumeric').focus(function(){
            $(this).select();
        }).numeric({
            decimal:false
            , minValue:0
        });
    });
</script>
<div id="content">

<!-- ========== CATEGORIES TABS ========= -->
<!-- ==================================== -->
<table id="contentMainWrapper" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td id="column-left" style="width: 215px;">
    <div style="width:215px;">
        <!--// bof: categories //-->
        <div class="box" id="categories" style="width:215px;">
            <div class="box-border">
                <div class="box-head">
                    <?php echo __('Categories') ?>
                </div>
                <div class="box-body">
                    <?php include_component('component', 'categoriesSideMenu') ?>
                </div>
            </div>
        </div>
        <!--// eof: categories //-->
        <!--// bof: specials //-->
        <div class="box" id="specials" style="width:215px;">
            <div class="box-border">
                <div class="box-head">
                    <a href="<?php echo url_for("/product/specialItem") ?>"><?php echo __('Specials') ?></a>
                </div>
                <div class="box-body">
                    <?php include_component('component', 'specialsSideMenu', array('param' => 'will implement for categoryType')) ?>
                </div>

            </div>
        </div>
        <!--// eof: specials //-->
    </div>
</td>

<td id="column-center" valign="top">
    <div class="column-center-padding">
        <div class="centerColumn" id="productGeneral">
            <!--bof Product Name-->
            <?php
            $title = $cmsProduct->getProductName() . " #" . $cmsProduct->getProductCode();
            if ($sf_user->getCulture() == "cn") {
                $title = $cmsProduct->getProductNameCn() . " #" . $cmsProduct->getProductCode();
            }
            ?>
            <h1 id="productName" class="productGeneral"><?php echo $title; ?></h1>
            <!--eof Product Name-->
            <!--bof Form start-->
            <form name="add2cartForm" action="/shoppingcart/add2cart" method="post" enctype="multipart/form-data">
                <!--eof Form start-->
                <!--bof Category Icon -->
                <div id="categoryIcon" class="categoryIcon" align="left">
                    <div class="wrapper">
                        <div class="fleft aligncenter">
                            <?php
                                $categoryTitle = $cmsCategory->getCategoriesName();

                                if ($sf_user->getCulture()=="cn") {
                                    $categoryTitle = $cmsCategory->getCategoriesNameCn();
                                }
                            ?>
                            Category: <a href="<?php echo url_for("/product/categories?id=".$cmsCategory->getCategoriesId()) ?>" style="color: #8B8B8B; font-size: 14px">
                                <?php echo $categoryTitle; ?></a></div>
                    </div>
                </div>
                <!--eof Category Icon -->
                <!--bof Prev/Next top position -->
                <!--eof Prev/Next top position-->
                <!--bof Main Product Image -->
                <div id="productMainImage" class="centeredContent back">

                    <a href="<?php echo url_for("/product/item?id=" . $cmsProduct->getProductId()) ?>">
                        <img height="177" title="<?php echo $title; ?>" alt="<?php echo $title; ?>" src="/uploads/products/<?php echo $cmsProduct->getProductPhoto() ?>">
                    </a>
                </div>
                <!--eof Main Product Image-->
                <!--bof Product Price block -->
                <h2 id="productPrices" class="productGeneral">
                    RM <?php echo number_format($cmsProduct->getPrice(), 2) ?></h2>
                <!--eof Product Price block -->
                <!--bof free ship icon  -->
                <!--eof free ship icon  -->
                <!--bof Product description -->
                <div id="productDescription" class="productGeneral biggerText">
                    <?php echo $cmsProduct->getProductDesc() ?>
                </div>
                <br><br clear="all">
                <!--   fancy box image lookup  -->
                <?php include_component('component', 'fancybox', array('param' => $cmsProduct->getProductId())) ?>
                <!--eof Product description -->
                <br class="clearBoth">

                <!--bof Add to Cart Box -->
                <div id="cartAdd">
                    <?php echo __('Add to Cart') ?>: <input name="cartQuantity" value="1" class="onlyNumeric" maxlength="6" size="4" type="text"><br><br>
                    <input name="productId" value="<?php echo $cmsProduct->getProductId() ?>" type="hidden">

                    <button id="addToCart"><?php echo __('Add this to my cart') ?></button>
                </div>
                <!--eof Add to Cart Box-->

                <!--bof Product details list  -->
                <ul id="productDetailsList" class="floatingBox back">
                    <li><?php echo $cmsProduct->getTotalUnit() ?> <?php echo __('Units in Stock') ?></li>
                </ul>
                <br class="clearBoth">
                <!--eof Product details list -->

                <!--bof Attributes Module -->
                <!--eof Attributes Module -->

                <!--bof Quantity Discounts table -->
                <!--eof Quantity Discounts table -->

                <!--bof Additional Product Images -->
                <!--eof Additional Product Images -->

                <!--bof Prev/Next bottom position -->
                <!--<div class="navNextPrevWrapper centeredContent">
                    <p class="navNextPrevCounter">Product 1/6</p>

                    <div class="navNextPrevList">
                        <a href="<?php /*echo url_for("/product/item?product=".$cmsProduct->getProductId()."&category=".$cmsProduct->getCategoriesId()."&query=previous") */?>" style="text-decoration: none">
                            <img src="/images/buttons/arrow-right.png"
                             alt="<?php /*echo __('Previous') */?>"
                             title="<?php /*echo __('Previous') */?>">&nbsp;<strong><?php /*echo __('Previous') */?></strong></a>
                    </div>

                    <div class="navNextPrevList">
                        <a href="<?php /*echo url_for("/product/item?product=".$cmsProduct->getProductId()."&category=".$cmsProduct->getCategoriesId()."&query=list") */?>" style="text-decoration: none">
                            <img src="/images/buttons/arrow-right.png"
                             alt="<?php /*echo __('Listing') */?>"
                             title="<?php /*echo __('Listing') */?>">&nbsp;<strong><?php /*echo __('Listing') */?></strong></a></div>

                    <div class="navNextPrevList">
                        <a href="<?php /*echo url_for("/product/item?product=".$cmsProduct->getProductId()."&category=".$cmsProduct->getCategoriesId()."&query=next") */?>" style="text-decoration: none">
                            <img src="/images/buttons/arrow-right.png"
                             alt="<?php /*echo __('Next') */?>"
                             title="<?php /*echo __('Next') */?>">&nbsp;<strong><?php /*echo __('Next') */?></strong></a></div>
                </div>-->
                <!--eof Prev/Next bottom position -->

                <!--bof Tell a Friend button -->
                <!--<div id="productTellFriendLink" class="buttonRow forward">
                    <a href="/*<?php //echo url_for("/contactUs/tellAFriend?product=" . $cmsProduct->getProductId*/()) ?>" style="text-decoration: none">
                    <img src="/images/buttons/arrow-right.png"
                         alt="/*<?php //echo __('Tell a Friend About U*/s') ?>"
                         title="/*<?php //echo __('Tell a Friend About U*/s') ?>">&nbsp;<strong>/*<?php echo __('Tell a Friend About U*/s') ?></strong></a>
                </div>-->
                <!--eof Tell a Friend button -->

                <!--bof Reviews button and count-->
                <div id="productReviewLink" class="buttonRow back">
                    <a href="<?php echo url_for("/product/writeReview?id=" . $cmsProduct->getProductId()) ?>" style="text-decoration: none">
                    <img src="/images/buttons/arrow-right.png"
                         alt="<?php echo __('Write Review') ?>"
                         title="<?php echo __('Write Review') ?>">&nbsp;<strong><?php echo __('Write Review') ?></strong></a>
                </div>
                <br class="clearBoth">
                <!--eof Reviews button and count -->
                <!--bof Product date added/available-->
                <?php
                    $timeStamp = strtotime($cmsProduct->getCreatedOn());
                    $dateString = date(Globals::FULL_DATETIME_FORMAT, $timeStamp);
                ?>
                <p id="productDateAdded" class="productGeneral centeredContent">This product was added to our catalog on
                    <?php echo $dateString ?>.</p>
            </form>
            <!--bof Form close-->
        </div>
        <div class="clear"></div>
        <!--eof content_center-->
    </div>
</td>
</tr>
</tbody>
</table>

</div>

<script type="text/javascript">
                <?php
                    echo "$('#disp_order').val('" . $sorting . "')";
                ?>
</script>